/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Auxiliares;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.image.BufferedImage;
import javax.swing.border.Border;

/**
 *
 * @author Jonathan Mendez
 */
public class PintaImagen implements Border{
    private  BufferedImage image ;

    public PintaImagen(BufferedImage image ) 
    {
        this.image=image;
    }

    @Override
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) 
    {
        g.drawImage(image,0,0,width,height,null); 
    }

    @Override
    public Insets getBorderInsets(Component c) 
    {
	return new Insets(0,0,0,0);
    }

    @Override
    public boolean isBorderOpaque() 
    {
	return true; 
    }
}